list = [1,2,3,4,5]
print(len(list[:-2]))
print(list[len(list)-3:len(list)])